<?php
echo   '<table>
        <tr><td>Thing 1</td><td>Thing 2</td></tr>
        <tr><td>Thing 3</td><td>Thing 4</td></tr>
        <tr><td><strong>Thing 5</strong></td><td><strong>Thing 6</strong></td></tr>
    </table>';

$table = simplexml_load_string(
    '<table>
        <tr><td>Thing 1</td><td>Thing 2</td></tr>
        <tr><td>Thing 3</td><td>Thing 4</td></tr>
        <tr><td><strong>Thing 5</strong></td><td><strong>Thing 6</strong></td></tr>
    </table>'
);

foreach ($table->xpath('//td') as $td)
{
    $content = strip_tags($td->asXML());
    echo $content, "\n";
}
?>




<?php
/**
 * Get the pagination number of the current post
 * 
 * @use global $post
 * 
 * @param int. Current post ID 
 * @return int
 */
function get_pagination_number($current_post){
	global $post;
	global $posts_per_page;
	$post_pos = 1;
	$query_string = "nopaging=true&post_type=Portfolio&post_status=publish&orderby=date&order=DESC";
	query_posts( $query_string );
	
 	if (have_posts()) : while (have_posts()) : the_post();
			if ($post->ID != $current_post) $post_pos++;
			else break;					
		endwhile;	
	endif;
	return $posts_per_page - ceil( $post_pos / $posts_per_page);
}

/**
 * Get the URL pagination and bookmark who contains the current post
 * 
 * @use global $post
 *
 * @return string. URL format	
 */
function get_pagination_url(){
	global $post;
	$current_post = $post->ID;
	$url_array = explode('/',$_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
	array_pop($url_array); array_pop($url_array);
	$url =  'http://' . implode('/',$url_array) .  '/page/' . get_pagination_number($current_post) . '#post-' . $current_post;
	return $url;
}

//echo var_dump(get_categories(array('type' => 'Portfolio')));
//echo var_dump(cp_get_taxonomies('portfolio_category'));
//echo get_post_meta($post->ID, '_title_link_value', true);
//echo get_pagination_url();
?>




<?php
//list terms in a given taxonomy using wp_list_categories  (also useful as a widget)
$orderby = 'name';
$show_count = 0; // 1 for yes, 0 for no
$pad_counts = 0; // 1 for yes, 0 for no
$hierarchical = 1; // 1 for yes, 0 for no
$taxonomy = 'thematic';
$title = '';

$args = array(
  'orderby' => $orderby,
  'show_count' => $show_count,
  'pad_counts' => $pad_counts,
  'hierarchical' => $hierarchical,
  'taxonomy' => $taxonomy,
  'title_li' => $title
);
?>
<ul>
<?php
wp_list_categories($args);
?>
</ul>

<?php
display_taxonomy_image_list('thematic');
?>